package com.fan.gofast.util.validator;

import java.util.regex.Matcher;
import java.util.regex.Pattern;

/**
 */
public class PatternUtils {

    /**
     * 手机号模式匹配表达式
     */
    private static final String PHONE_NUMBER_EXPRESSION = "^[1]([3-9])[0-9]{9}$";

    /**
     * 手机号模式器
     */
    private static final Pattern PHONE_PATTERN = Pattern.compile(PHONE_NUMBER_EXPRESSION);

    /**
     * 是否为异常手机号
     *
     * @param phoneNumber
     */
    public static boolean isPhoneNumber(String phoneNumber) {
        Matcher matcher = PHONE_PATTERN.matcher(phoneNumber);
        return matcher.matches();
    }

}
